layui.use(['jquery', 'element','util','form','layer'], function () {
    // var $ = layui.jquery;
    var element = layui.element;
    var util = layui.util;
    var form = layui.form;
    var layer = layui.layer;
    //固定块
    util.fixbar({
        bar1: "&#xe68e;"
        ,bar2: false
        ,css: {right: 50, bottom: 20}
        ,bgcolor: '#393D49'
        ,click: function(type){
            if(type === 'bar1'){
                // $("html,body").animate({"scrollTop":0});
                location.href='/'
            }
        }
    });
    form.on('submit(apply)',function (data) {
        $.post('apply',data.field,function (resp) {
            if(resp){
                layer.msg('申请已提交，请保持手机畅通，我们将与您取得联系',{icon:1},function () {
                    $('#applyForm')[0].reset();
                });
            }else{
                layer.msg('申请提交失败，请检查您的输入');
            }
        })

        return false;
    })

});